package com.dzm.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dzm.entity.Emp;
import com.dzm.service.EmpService;
import com.dzm.mapper.EmpMapper;
import com.dzm.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

/**
* @author Dzm
* @description 针对表【emp】的数据库操作Service实现
* @createDate 2024-08-21 15:36:36
*/
@Service
public class EmpServiceImpl extends ServiceImpl<EmpMapper, Emp>
    implements EmpService{

    @Autowired
    private RestTemplate restTemplate;

    @Override
    public R getStudentById2(Integer id) {
        return restTemplate.getForObject("http://student-server/student/getStudentById/" + id, R.class);
    }
}




